import { useParams } from 'react-router-dom';

import VulnerableTemplate from '@/components/VulnerableTemplate';

import BurstDelay from './level/BurstDelay';
import BurstLimit from './level/BurstLimit';
import BurstNormal from './level/BurteNormal';

const Burst = () => {
  const { level } = useParams();
  const levelMap: any = {
    normal: BurstNormal,
    delay: BurstDelay,
    limit: BurstLimit,
  };

  return <VulnerableTemplate {...levelMap[level!]} />;
};

export default Burst;
